package drds.binlog.protocol.entry_protocol_proto;

import com.google.protobuf.Descriptors;
import com.google.protobuf.GeneratedMessageV3;
import com.google.protobuf.InvalidProtocolBufferException;

/**
 * <pre>
 * *每个字段的数据结构*
 * </pre>
 * <p>
 */
public final class Column extends
        GeneratedMessageV3 implements

        ColumnOrBuilder
{
    public static final int INDEX_FIELD_NUMBER = 1;
    public static final int SQLTYPE_FIELD_NUMBER = 2;
    public static final int NAME_FIELD_NUMBER = 3;
    public static final int ISKEY_FIELD_NUMBER = 4;
    public static final int UPDATED_FIELD_NUMBER = 5;
    public static final int ISNULL_FIELD_NUMBER = 6;
    public static final int PROPS_FIELD_NUMBER = 7;
    public static final int VALUE_FIELD_NUMBER = 8;
    public static final int LENGTH_FIELD_NUMBER = 9;
    public static final int MYSQLTYPE_FIELD_NUMBER = 10;
    private static final long serialVersionUID = 0L;

    ;
    // @@protoc_insertion_point(class_scope:com.alibaba.otter.canal.protocol.Column)
    private static final Column DEFAULT_INSTANCE;
    private static final com.google.protobuf.Parser<Column>
            PARSER = new com.google.protobuf.AbstractParser<Column>()
    {
        @Override
        public Column parsePartialFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws com.google.protobuf.InvalidProtocolBufferException
        {
            return new Column(input, extensionRegistry);
        }
    };

    static
    {
        DEFAULT_INSTANCE = new Column();
    }

    private int bitField0_;
    private int isNullPresentCase_ = 0;
    private Object isNullPresent_;
    private int index_;
    private int sqlType_;
    private volatile Object name_;
    private boolean isKey_;
    private boolean updated_;
    private java.util.List<Pair> props_;
    private volatile Object value_;
    private int length_;
    private volatile Object mysqlType_;
    private byte memoizedIsInitialized = -1;

    // Use Column.newBuilder() to construct.
    private Column(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)
    {
        super(builder);
    }

    private Column()
    {
        index_ = 0;
        sqlType_ = 0;
        name_ = "";
        isKey_ = false;
        updated_ = false;
        props_ = java.util.Collections.emptyList();
        value_ = "";
        length_ = 0;
        mysqlType_ = "";
    }

    private Column(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        this();
        if (extensionRegistry == null)
        {
            throw new NullPointerException();
        }
        int mutable_bitField0_ = 0;
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
                com.google.protobuf.UnknownFieldSet.newBuilder();
        try
        {
            boolean done = false;
            while (!done)
            {
                int tag = input.readTag();
                switch (tag)
                {
                    case 0:
                        done = true;
                        break;
                    case 8:
                    {

                        index_ = input.readInt32();
                        break;
                    }
                    case 16:
                    {

                        sqlType_ = input.readInt32();
                        break;
                    }
                    case 26:
                    {
                        String s = input.readStringRequireUtf8();

                        name_ = s;
                        break;
                    }
                    case 32:
                    {

                        isKey_ = input.readBool();
                        break;
                    }
                    case 40:
                    {

                        updated_ = input.readBool();
                        break;
                    }
                    case 48:
                    {
                        isNullPresentCase_ = 6;
                        isNullPresent_ = input.readBool();
                        break;
                    }
                    case 58:
                    {
                        if (!((mutable_bitField0_ & 0x00000040) == 0x00000040))
                        {
                            props_ = new java.util.ArrayList<Pair>();
                            mutable_bitField0_ |= 0x00000040;
                        }
                        props_.add(
                                input.readMessage(Pair.parser(), extensionRegistry));
                        break;
                    }
                    case 66:
                    {
                        String s = input.readStringRequireUtf8();

                        value_ = s;
                        break;
                    }
                    case 72:
                    {

                        length_ = input.readInt32();
                        break;
                    }
                    case 82:
                    {
                        String s = input.readStringRequireUtf8();

                        mysqlType_ = s;
                        break;
                    }
                    default:
                    {
                        if (!parseUnknownFieldProto3(
                                input, unknownFields, extensionRegistry, tag))
                        {
                            done = true;
                        }
                        break;
                    }
                }
            }
        } catch (InvalidProtocolBufferException e)
        {
            throw e.setUnfinishedMessage(this);
        } catch (java.io.IOException e)
        {
            throw new com.google.protobuf.InvalidProtocolBufferException(
                    e).setUnfinishedMessage(this);
        } finally
        {
            if (((mutable_bitField0_ & 0x00000040) == 0x00000040))
            {
                props_ = java.util.Collections.unmodifiableList(props_);
            }
            this.unknownFields = unknownFields.build();
            makeExtensionsImmutable();
        }
    }

    public static final Descriptors.Descriptor
    getDescriptor()
    {
        return BinlogEntry.protocol_Column_descriptor;
    }

    public static Column parseFrom(
            java.nio.ByteBuffer data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Column parseFrom(
            java.nio.ByteBuffer data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Column parseFrom(
            com.google.protobuf.ByteString data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Column parseFrom(
            com.google.protobuf.ByteString data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Column parseFrom(byte[] data)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data);
    }

    public static Column parseFrom(
            byte[] data,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException
    {
        return PARSER.parseFrom(data, extensionRegistry);
    }

    public static Column parseFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static Column parseFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Column parseDelimitedFrom(java.io.InputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input);
    }

    public static Column parseDelimitedFrom(
            java.io.InputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }

    public static Column parseFrom(
            com.google.protobuf.CodedInputStream input)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input);
    }

    public static Column parseFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException
    {
        return com.google.protobuf.GeneratedMessageV3
                .parseWithIOException(PARSER, input, extensionRegistry);
    }

    public static Builder newBuilder()
    {
        return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(Column prototype)
    {
        return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    public static Column getDefaultInstance()
    {
        return DEFAULT_INSTANCE;
    }

    public static com.google.protobuf.Parser<Column> parser()
    {
        return PARSER;
    }

    @Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields()
    {
        return this.unknownFields;
    }

    @Override
    protected FieldAccessorTable
    internalGetFieldAccessorTable()
    {
        return BinlogEntry.protocol_Column_fieldAccessorTable
                .ensureFieldAccessorsInitialized(
                        Column.class, Builder.class);
    }

    public IsNullPresentCase
    getIsNullPresentCase()
    {
        return IsNullPresentCase.forNumber(
                isNullPresentCase_);
    }

    /**
     * <pre>
     * *字段下标*
     * </pre>
     * <p>
     * <code>int32 index = 1;</code>
     */
    public int getIndex()
    {
        return index_;
    }

    /**
     * <pre>
     * *字段java中类型*
     * </pre>
     * <p>
     * <code>int32 sqlType = 2;</code>
     */
    public int getSqlType()
    {
        return sqlType_;
    }

    /**
     * <pre>
     * *字段名称(忽略大小写)，在mysql中是没有的*
     * </pre>
     * <p>
     * <code>string name = 3;</code>
     */
    public String getName()
    {
        Object ref = name_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            name_ = s;
            return s;
        }
    }

    /**
     * <pre>
     * *字段名称(忽略大小写)，在mysql中是没有的*
     * </pre>
     * <p>
     * <code>string name = 3;</code>
     */
    public com.google.protobuf.ByteString
    getNameBytes()
    {
        Object ref = name_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            name_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    /**
     * <pre>
     * *是否是主键*
     * </pre>
     * <p>
     * <code>bool isKey = 4;</code>
     */
    public boolean getIsKey()
    {
        return isKey_;
    }

    /**
     * <pre>
     * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
     * </pre>
     * <p>
     * <code>bool updated = 5;</code>
     */
    public boolean getUpdated()
    {
        return updated_;
    }

    /**
     * <code>bool isNull = 6;</code>
     */
    public boolean getIsNull()
    {
        if (isNullPresentCase_ == 6)
        {
            return (Boolean) isNullPresent_;
        }
        return false;
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
     */
    public java.util.List<Pair> getPropsList()
    {
        return props_;
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
     */
    public java.util.List<? extends PairOrBuilder>
    getPropsOrBuilderList()
    {
        return props_;
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
     */
    public int getPropsCount()
    {
        return props_.size();
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
     */
    public Pair getProps(int index)
    {
        return props_.get(index);
    }

    /**
     * <pre>
     * *预留扩展*
     * </pre>
     * <p>
     * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
     */
    public PairOrBuilder getPropsOrBuilder(
            int index)
    {
        return props_.get(index);
    }

    /**
     * <pre>
     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
     * </pre>
     * <p>
     * <code>string value = 8;</code>
     */
    public String getValue()
    {
        Object ref = value_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            value_ = s;
            return s;
        }
    }

    /**
     * <pre>
     * * 字段值,timestamp,Datetime是一个时间格式的文本 *
     * </pre>
     * <p>
     * <code>string value = 8;</code>
     */
    public com.google.protobuf.ByteString
    getValueBytes()
    {
        Object ref = value_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            value_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    /**
     * <pre>
     * * 对应数据对象原始长度 *
     * </pre>
     * <p>
     * <code>int32 length = 9;</code>
     */
    public int getLength()
    {
        return length_;
    }

    /**
     * <pre>
     * *字段mysql类型*
     * </pre>
     * <p>
     * <code>string mysqlType = 10;</code>
     */
    public String getMysqlType()
    {
        Object ref = mysqlType_;
        if (ref instanceof String)
        {
            return (String) ref;
        } else
        {
            com.google.protobuf.ByteString bs =
                    (com.google.protobuf.ByteString) ref;
            String s = bs.toStringUtf8();
            mysqlType_ = s;
            return s;
        }
    }

    /**
     * <pre>
     * *字段mysql类型*
     * </pre>
     * <p>
     * <code>string mysqlType = 10;</code>
     */
    public com.google.protobuf.ByteString
    getMysqlTypeBytes()
    {
        Object ref = mysqlType_;
        if (ref instanceof String)
        {
            com.google.protobuf.ByteString b =
                    com.google.protobuf.ByteString.copyFromUtf8(
                            (String) ref);
            mysqlType_ = b;
            return b;
        } else
        {
            return (com.google.protobuf.ByteString) ref;
        }
    }

    @Override
    public final boolean isInitialized()
    {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized == 1) return true;
        if (isInitialized == 0) return false;

        memoizedIsInitialized = 1;
        return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
            throws java.io.IOException
    {
        if (index_ != 0)
        {
            output.writeInt32(1, index_);
        }
        if (sqlType_ != 0)
        {
            output.writeInt32(2, sqlType_);
        }
        if (!getNameBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
        }
        if (isKey_ != false)
        {
            output.writeBool(4, isKey_);
        }
        if (updated_ != false)
        {
            output.writeBool(5, updated_);
        }
        if (isNullPresentCase_ == 6)
        {
            output.writeBool(
                    6, (boolean) ((Boolean) isNullPresent_));
        }
        for (int i = 0; i < props_.size(); i++)
        {
            output.writeMessage(7, props_.get(i));
        }
        if (!getValueBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 8, value_);
        }
        if (length_ != 0)
        {
            output.writeInt32(9, length_);
        }
        if (!getMysqlTypeBytes().isEmpty())
        {
            com.google.protobuf.GeneratedMessageV3.writeString(output, 10, mysqlType_);
        }
        unknownFields.writeTo(output);
    }

    @Override
    public int getSerializedSize()
    {
        int size = memoizedSize;
        if (size != -1) return size;

        size = 0;
        if (index_ != 0)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt32Size(1, index_);
        }
        if (sqlType_ != 0)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt32Size(2, sqlType_);
        }
        if (!getNameBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
        }
        if (isKey_ != false)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeBoolSize(4, isKey_);
        }
        if (updated_ != false)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeBoolSize(5, updated_);
        }
        if (isNullPresentCase_ == 6)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeBoolSize(
                            6, (boolean) ((Boolean) isNullPresent_));
        }
        for (int i = 0; i < props_.size(); i++)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeMessageSize(7, props_.get(i));
        }
        if (!getValueBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, value_);
        }
        if (length_ != 0)
        {
            size += com.google.protobuf.CodedOutputStream
                    .computeInt32Size(9, length_);
        }
        if (!getMysqlTypeBytes().isEmpty())
        {
            size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, mysqlType_);
        }
        size += unknownFields.getSerializedSize();
        memoizedSize = size;
        return size;
    }

    @Override
    public boolean equals(final Object obj)
    {
        if (obj == this)
        {
            return true;
        }
        if (!(obj instanceof Column))
        {
            return super.equals(obj);
        }
        Column other = (Column) obj;

        boolean result = true;
        result = result && (getIndex()
                == other.getIndex());
        result = result && (getSqlType()
                == other.getSqlType());
        result = result && getName()
                .equals(other.getName());
        result = result && (getIsKey()
                == other.getIsKey());
        result = result && (getUpdated()
                == other.getUpdated());
        result = result && getPropsList()
                .equals(other.getPropsList());
        result = result && getValue()
                .equals(other.getValue());
        result = result && (getLength()
                == other.getLength());
        result = result && getMysqlType()
                .equals(other.getMysqlType());
        result = result && getIsNullPresentCase().equals(
                other.getIsNullPresentCase());
        if (!result) return false;
        switch (isNullPresentCase_)
        {
            case 6:
                result = result && (getIsNull()
                        == other.getIsNull());
                break;
            case 0:
            default:
        }
        result = result && unknownFields.equals(other.unknownFields);
        return result;
    }

    @Override
    public int hashCode()
    {
        if (memoizedHashCode != 0)
        {
            return memoizedHashCode;
        }
        int hash = 41;
        hash = (19 * hash) + getDescriptor().hashCode();
        hash = (37 * hash) + INDEX_FIELD_NUMBER;
        hash = (53 * hash) + getIndex();
        hash = (37 * hash) + SQLTYPE_FIELD_NUMBER;
        hash = (53 * hash) + getSqlType();
        hash = (37 * hash) + NAME_FIELD_NUMBER;
        hash = (53 * hash) + getName().hashCode();
        hash = (37 * hash) + ISKEY_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
                getIsKey());
        hash = (37 * hash) + UPDATED_FIELD_NUMBER;
        hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
                getUpdated());
        if (getPropsCount() > 0)
        {
            hash = (37 * hash) + PROPS_FIELD_NUMBER;
            hash = (53 * hash) + getPropsList().hashCode();
        }
        hash = (37 * hash) + VALUE_FIELD_NUMBER;
        hash = (53 * hash) + getValue().hashCode();
        hash = (37 * hash) + LENGTH_FIELD_NUMBER;
        hash = (53 * hash) + getLength();
        hash = (37 * hash) + MYSQLTYPE_FIELD_NUMBER;
        hash = (53 * hash) + getMysqlType().hashCode();
        switch (isNullPresentCase_)
        {
            case 6:
                hash = (37 * hash) + ISNULL_FIELD_NUMBER;
                hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
                        getIsNull());
                break;
            case 0:
            default:
        }
        hash = (29 * hash) + unknownFields.hashCode();
        memoizedHashCode = hash;
        return hash;
    }

    @Override
    public Builder newBuilderForType()
    {
        return newBuilder();
    }

    @Override
    public Builder toBuilder()
    {
        return this == DEFAULT_INSTANCE
                ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
            BuilderParent parent)
    {
        Builder builder = new Builder(parent);
        return builder;
    }

    @Override
    public com.google.protobuf.Parser<Column> getParserForType()
    {
        return PARSER;
    }

    @Override
    public Column getDefaultInstanceForType()
    {
        return DEFAULT_INSTANCE;
    }

    public enum IsNullPresentCase
            implements com.google.protobuf.Internal.EnumLite
    {
        ISNULL(6),
        ISNULLPRESENT_NOT_SET(0);
        private final int value;

        private IsNullPresentCase(int value)
        {
            this.value = value;
        }

        /**
         * @deprecated Use {@link #forNumber(int)} instead.
         */
        @Deprecated
        public static IsNullPresentCase valueOf(int value)
        {
            return forNumber(value);
        }

        public static IsNullPresentCase forNumber(int value)
        {
            switch (value)
            {
                case 6:
                    return ISNULL;
                case 0:
                    return ISNULLPRESENT_NOT_SET;
                default:
                    return null;
            }
        }

        public int getNumber()
        {
            return this.value;
        }
    }

    /**
     * <pre>
     * *每个字段的数据结构*
     * </pre>
     * <p>
     * Protobuf type {@code com.alibaba.otter.canal.protocol.Column}
     */
    public static final class Builder extends
            com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
            // @@protoc_insertion_point(builder_implements:com.alibaba.otter.canal.protocol.Column)
            ColumnOrBuilder
    {
        private int isNullPresentCase_ = 0;
        private Object isNullPresent_;
        private int bitField0_;
        private int index_;
        private int sqlType_;
        private Object name_ = "";
        private boolean isKey_;
        private boolean updated_;
        private java.util.List<Pair> props_ =
                java.util.Collections.emptyList();
        private com.google.protobuf.RepeatedFieldBuilderV3<
                Pair, Pair.Builder, PairOrBuilder> propsBuilder_;
        private Object value_ = "";
        private int length_;
        private Object mysqlType_ = "";

        // Construct using BinlogEntry.Column.newBuilder()
        private Builder()
        {
            maybeForceBuilderInitialization();
        }

        private Builder(
                BuilderParent parent)
        {
            super(parent);
            maybeForceBuilderInitialization();
        }

        public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor()
        {
            return BinlogEntry.protocol_Column_descriptor;
        }

        @Override
        protected FieldAccessorTable
        internalGetFieldAccessorTable()
        {
            return BinlogEntry.protocol_Column_fieldAccessorTable
                    .ensureFieldAccessorsInitialized(
                            Column.class, Builder.class);
        }

        private void maybeForceBuilderInitialization()
        {
            if (com.google.protobuf.GeneratedMessageV3
                    .alwaysUseFieldBuilders)
            {
                getPropsFieldBuilder();
            }
        }

        @Override
        public Builder clear()
        {
            super.clear();
            index_ = 0;

            sqlType_ = 0;

            name_ = "";

            isKey_ = false;

            updated_ = false;

            if (propsBuilder_ == null)
            {
                props_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000040);
            } else
            {
                propsBuilder_.clear();
            }
            value_ = "";

            length_ = 0;

            mysqlType_ = "";

            isNullPresentCase_ = 0;
            isNullPresent_ = null;
            return this;
        }

        @Override
        public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType()
        {
            return BinlogEntry.protocol_Column_descriptor;
        }

        @Override
        public Column getDefaultInstanceForType()
        {
            return Column.getDefaultInstance();
        }

        @Override
        public Column build()
        {
            Column result = buildPartial();
            if (!result.isInitialized())
            {
                throw newUninitializedMessageException(result);
            }
            return result;
        }

        @Override
        public Column buildPartial()
        {
            Column result = new Column(this);
            int from_bitField0_ = bitField0_;
            int to_bitField0_ = 0;
            result.index_ = index_;
            result.sqlType_ = sqlType_;
            result.name_ = name_;
            result.isKey_ = isKey_;
            result.updated_ = updated_;
            if (isNullPresentCase_ == 6)
            {
                result.isNullPresent_ = isNullPresent_;
            }
            if (propsBuilder_ == null)
            {
                if (((bitField0_ & 0x00000040) == 0x00000040))
                {
                    props_ = java.util.Collections.unmodifiableList(props_);
                    bitField0_ = (bitField0_ & ~0x00000040);
                }
                result.props_ = props_;
            } else
            {
                result.props_ = propsBuilder_.build();
            }
            result.value_ = value_;
            result.length_ = length_;
            result.mysqlType_ = mysqlType_;
            result.bitField0_ = to_bitField0_;
            result.isNullPresentCase_ = isNullPresentCase_;
            onBuilt();
            return result;
        }

        @Override
        public Builder clone()
        {
            return (Builder) super.clone();
        }

        @Override
        public Builder setField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.setField(field, value);
        }

        @Override
        public Builder clearField(
                com.google.protobuf.Descriptors.FieldDescriptor field)
        {
            return (Builder) super.clearField(field);
        }

        @Override
        public Builder clearOneof(
                com.google.protobuf.Descriptors.OneofDescriptor oneof)
        {
            return (Builder) super.clearOneof(oneof);
        }

        @Override
        public Builder setRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                int index, Object value)
        {
            return (Builder) super.setRepeatedField(field, index, value);
        }

        @Override
        public Builder addRepeatedField(
                com.google.protobuf.Descriptors.FieldDescriptor field,
                Object value)
        {
            return (Builder) super.addRepeatedField(field, value);
        }

        @Override
        public Builder mergeFrom(com.google.protobuf.Message other)
        {
            if (other instanceof Column)
            {
                return mergeFrom((Column) other);
            } else
            {
                super.mergeFrom(other);
                return this;
            }
        }

        public Builder mergeFrom(Column other)
        {
            if (other == Column.getDefaultInstance()) return this;
            if (other.getIndex() != 0)
            {
                setIndex(other.getIndex());
            }
            if (other.getSqlType() != 0)
            {
                setSqlType(other.getSqlType());
            }
            if (!other.getName().isEmpty())
            {
                name_ = other.name_;
                onChanged();
            }
            if (other.getIsKey() != false)
            {
                setIsKey(other.getIsKey());
            }
            if (other.getUpdated() != false)
            {
                setUpdated(other.getUpdated());
            }
            if (propsBuilder_ == null)
            {
                if (!other.props_.isEmpty())
                {
                    if (props_.isEmpty())
                    {
                        props_ = other.props_;
                        bitField0_ = (bitField0_ & ~0x00000040);
                    } else
                    {
                        ensurePropsIsMutable();
                        props_.addAll(other.props_);
                    }
                    onChanged();
                }
            } else
            {
                if (!other.props_.isEmpty())
                {
                    if (propsBuilder_.isEmpty())
                    {
                        propsBuilder_.dispose();
                        propsBuilder_ = null;
                        props_ = other.props_;
                        bitField0_ = (bitField0_ & ~0x00000040);
                        propsBuilder_ =
                                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                                        getPropsFieldBuilder() : null;
                    } else
                    {
                        propsBuilder_.addAllMessages(other.props_);
                    }
                }
            }
            if (!other.getValue().isEmpty())
            {
                value_ = other.value_;
                onChanged();
            }
            if (other.getLength() != 0)
            {
                setLength(other.getLength());
            }
            if (!other.getMysqlType().isEmpty())
            {
                mysqlType_ = other.mysqlType_;
                onChanged();
            }
            switch (other.getIsNullPresentCase())
            {
                case ISNULL:
                {
                    setIsNull(other.getIsNull());
                    break;
                }
                case ISNULLPRESENT_NOT_SET:
                {
                    break;
                }
            }
            this.mergeUnknownFields(other.unknownFields);
            onChanged();
            return this;
        }

        @Override
        public final boolean isInitialized()
        {
            return true;
        }

        @Override
        public Builder mergeFrom(
                com.google.protobuf.CodedInputStream input,
                com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                throws java.io.IOException
        {
            Column parsedMessage = null;
            try
            {
                parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e)
            {
                parsedMessage = (Column) e.getUnfinishedMessage();
                throw e.unwrapIOException();
            } finally
            {
                if (parsedMessage != null)
                {
                    mergeFrom(parsedMessage);
                }
            }
            return this;
        }

        public IsNullPresentCase
        getIsNullPresentCase()
        {
            return IsNullPresentCase.forNumber(
                    isNullPresentCase_);
        }

        public Builder clearIsNullPresent()
        {
            isNullPresentCase_ = 0;
            isNullPresent_ = null;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段下标*
         * </pre>
         * <p>
         * <code>int32 index = 1;</code>
         */
        public int getIndex()
        {
            return index_;
        }

        /**
         * <pre>
         * *字段下标*
         * </pre>
         * <p>
         * <code>int32 index = 1;</code>
         */
        public Builder setIndex(int value)
        {

            index_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段下标*
         * </pre>
         * <p>
         * <code>int32 index = 1;</code>
         */
        public Builder clearIndex()
        {

            index_ = 0;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段java中类型*
         * </pre>
         * <p>
         * <code>int32 sqlType = 2;</code>
         */
        public int getSqlType()
        {
            return sqlType_;
        }

        /**
         * <pre>
         * *字段java中类型*
         * </pre>
         * <p>
         * <code>int32 sqlType = 2;</code>
         */
        public Builder setSqlType(int value)
        {

            sqlType_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段java中类型*
         * </pre>
         * <p>
         * <code>int32 sqlType = 2;</code>
         */
        public Builder clearSqlType()
        {

            sqlType_ = 0;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段名称(忽略大小写)，在mysql中是没有的*
         * </pre>
         * <p>
         * <code>string name = 3;</code>
         */
        public String getName()
        {
            Object ref = name_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                name_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <pre>
         * *字段名称(忽略大小写)，在mysql中是没有的*
         * </pre>
         * <p>
         * <code>string name = 3;</code>
         */
        public Builder setName(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            name_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段名称(忽略大小写)，在mysql中是没有的*
         * </pre>
         * <p>
         * <code>string name = 3;</code>
         */
        public com.google.protobuf.ByteString
        getNameBytes()
        {
            Object ref = name_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                name_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <pre>
         * *字段名称(忽略大小写)，在mysql中是没有的*
         * </pre>
         * <p>
         * <code>string name = 3;</code>
         */
        public Builder setNameBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            name_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段名称(忽略大小写)，在mysql中是没有的*
         * </pre>
         * <p>
         * <code>string name = 3;</code>
         */
        public Builder clearName()
        {

            name_ = getDefaultInstance().getName();
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *是否是主键*
         * </pre>
         * <p>
         * <code>bool isKey = 4;</code>
         */
        public boolean getIsKey()
        {
            return isKey_;
        }

        /**
         * <pre>
         * *是否是主键*
         * </pre>
         * <p>
         * <code>bool isKey = 4;</code>
         */
        public Builder setIsKey(boolean value)
        {

            isKey_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *是否是主键*
         * </pre>
         * <p>
         * <code>bool isKey = 4;</code>
         */
        public Builder clearIsKey()
        {

            isKey_ = false;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
         * </pre>
         * <p>
         * <code>bool updated = 5;</code>
         */
        public boolean getUpdated()
        {
            return updated_;
        }

        /**
         * <pre>
         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
         * </pre>
         * <p>
         * <code>bool updated = 5;</code>
         */
        public Builder setUpdated(boolean value)
        {

            updated_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *如果EventType=UPDATE,用于标识这个字段值是否有修改*
         * </pre>
         * <p>
         * <code>bool updated = 5;</code>
         */
        public Builder clearUpdated()
        {

            updated_ = false;
            onChanged();
            return this;
        }

        /**
         * <code>bool isNull = 6;</code>
         */
        public boolean getIsNull()
        {
            if (isNullPresentCase_ == 6)
            {
                return (Boolean) isNullPresent_;
            }
            return false;
        }

        /**
         * <code>bool isNull = 6;</code>
         */
        public Builder setIsNull(boolean value)
        {
            isNullPresentCase_ = 6;
            isNullPresent_ = value;
            onChanged();
            return this;
        }

        /**
         * <code>bool isNull = 6;</code>
         */
        public Builder clearIsNull()
        {
            if (isNullPresentCase_ == 6)
            {
                isNullPresentCase_ = 0;
                isNullPresent_ = null;
                onChanged();
            }
            return this;
        }

        private void ensurePropsIsMutable()
        {
            if (!((bitField0_ & 0x00000040) == 0x00000040))
            {
                props_ = new java.util.ArrayList<Pair>(props_);
                bitField0_ |= 0x00000040;
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public java.util.List<Pair> getPropsList()
        {
            if (propsBuilder_ == null)
            {
                return java.util.Collections.unmodifiableList(props_);
            } else
            {
                return propsBuilder_.getMessageList();
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public int getPropsCount()
        {
            if (propsBuilder_ == null)
            {
                return props_.size();
            } else
            {
                return propsBuilder_.getCount();
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Pair getProps(int index)
        {
            if (propsBuilder_ == null)
            {
                return props_.get(index);
            } else
            {
                return propsBuilder_.getMessage(index);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder setProps(
                int index, Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.set(index, value);
                onChanged();
            } else
            {
                propsBuilder_.setMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder setProps(
                int index, Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.set(index, builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.setMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder addProps(Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.add(value);
                onChanged();
            } else
            {
                propsBuilder_.addMessage(value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder addProps(
                int index, Pair value)
        {
            if (propsBuilder_ == null)
            {
                if (value == null)
                {
                    throw new NullPointerException();
                }
                ensurePropsIsMutable();
                props_.add(index, value);
                onChanged();
            } else
            {
                propsBuilder_.addMessage(index, value);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder addProps(
                Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.add(builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.addMessage(builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder addProps(
                int index, Pair.Builder builderForValue)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.add(index, builderForValue.build());
                onChanged();
            } else
            {
                propsBuilder_.addMessage(index, builderForValue.build());
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder addAllProps(
                Iterable<? extends Pair> values)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                com.google.protobuf.AbstractMessageLite.Builder.addAll(
                        values, props_);
                onChanged();
            } else
            {
                propsBuilder_.addAllMessages(values);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder clearProps()
        {
            if (propsBuilder_ == null)
            {
                props_ = java.util.Collections.emptyList();
                bitField0_ = (bitField0_ & ~0x00000040);
                onChanged();
            } else
            {
                propsBuilder_.clear();
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Builder removeProps(int index)
        {
            if (propsBuilder_ == null)
            {
                ensurePropsIsMutable();
                props_.remove(index);
                onChanged();
            } else
            {
                propsBuilder_.remove(index);
            }
            return this;
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Pair.Builder getPropsBuilder(
                int index)
        {
            return getPropsFieldBuilder().getBuilder(index);
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public PairOrBuilder getPropsOrBuilder(
                int index)
        {
            if (propsBuilder_ == null)
            {
                return props_.get(index);
            } else
            {
                return propsBuilder_.getMessageOrBuilder(index);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public java.util.List<? extends PairOrBuilder>
        getPropsOrBuilderList()
        {
            if (propsBuilder_ != null)
            {
                return propsBuilder_.getMessageOrBuilderList();
            } else
            {
                return java.util.Collections.unmodifiableList(props_);
            }
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Pair.Builder addPropsBuilder()
        {
            return getPropsFieldBuilder().addBuilder(
                    Pair.getDefaultInstance());
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public Pair.Builder addPropsBuilder(
                int index)
        {
            return getPropsFieldBuilder().addBuilder(
                    index, Pair.getDefaultInstance());
        }

        /**
         * <pre>
         * *预留扩展*
         * </pre>
         * <p>
         * <code>repeated .com.alibaba.otter.canal.protocol.Pair props = 7;</code>
         */
        public java.util.List<Pair.Builder>
        getPropsBuilderList()
        {
            return getPropsFieldBuilder().getBuilderList();
        }

        private com.google.protobuf.RepeatedFieldBuilderV3<
                Pair, Pair.Builder, PairOrBuilder>
        getPropsFieldBuilder()
        {
            if (propsBuilder_ == null)
            {
                propsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
                        Pair, Pair.Builder, PairOrBuilder>(
                        props_,
                        ((bitField0_ & 0x00000040) == 0x00000040),
                        getParentForChildren(),
                        isClean());
                props_ = null;
            }
            return propsBuilder_;
        }

        /**
         * <pre>
         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
         * </pre>
         * <p>
         * <code>string value = 8;</code>
         */
        public String getValue()
        {
            Object ref = value_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                value_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <pre>
         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
         * </pre>
         * <p>
         * <code>string value = 8;</code>
         */
        public Builder setValue(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            value_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
         * </pre>
         * <p>
         * <code>string value = 8;</code>
         */
        public com.google.protobuf.ByteString
        getValueBytes()
        {
            Object ref = value_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                value_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <pre>
         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
         * </pre>
         * <p>
         * <code>string value = 8;</code>
         */
        public Builder setValueBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            value_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * 字段值,timestamp,Datetime是一个时间格式的文本 *
         * </pre>
         * <p>
         * <code>string value = 8;</code>
         */
        public Builder clearValue()
        {

            value_ = getDefaultInstance().getValue();
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * 对应数据对象原始长度 *
         * </pre>
         * <p>
         * <code>int32 length = 9;</code>
         */
        public int getLength()
        {
            return length_;
        }

        /**
         * <pre>
         * * 对应数据对象原始长度 *
         * </pre>
         * <p>
         * <code>int32 length = 9;</code>
         */
        public Builder setLength(int value)
        {

            length_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * * 对应数据对象原始长度 *
         * </pre>
         * <p>
         * <code>int32 length = 9;</code>
         */
        public Builder clearLength()
        {

            length_ = 0;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段mysql类型*
         * </pre>
         * <p>
         * <code>string mysqlType = 10;</code>
         */
        public String getMysqlType()
        {
            Object ref = mysqlType_;
            if (!(ref instanceof String))
            {
                com.google.protobuf.ByteString bs =
                        (com.google.protobuf.ByteString) ref;
                String s = bs.toStringUtf8();
                mysqlType_ = s;
                return s;
            } else
            {
                return (String) ref;
            }
        }

        /**
         * <pre>
         * *字段mysql类型*
         * </pre>
         * <p>
         * <code>string mysqlType = 10;</code>
         */
        public Builder setMysqlType(
                String value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }

            mysqlType_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段mysql类型*
         * </pre>
         * <p>
         * <code>string mysqlType = 10;</code>
         */
        public com.google.protobuf.ByteString
        getMysqlTypeBytes()
        {
            Object ref = mysqlType_;
            if (ref instanceof String)
            {
                com.google.protobuf.ByteString b =
                        com.google.protobuf.ByteString.copyFromUtf8(
                                (String) ref);
                mysqlType_ = b;
                return b;
            } else
            {
                return (com.google.protobuf.ByteString) ref;
            }
        }

        /**
         * <pre>
         * *字段mysql类型*
         * </pre>
         * <p>
         * <code>string mysqlType = 10;</code>
         */
        public Builder setMysqlTypeBytes(
                com.google.protobuf.ByteString value)
        {
            if (value == null)
            {
                throw new NullPointerException();
            }
            checkByteStringIsUtf8(value);

            mysqlType_ = value;
            onChanged();
            return this;
        }

        /**
         * <pre>
         * *字段mysql类型*
         * </pre>
         * <p>
         * <code>string mysqlType = 10;</code>
         */
        public Builder clearMysqlType()
        {

            mysqlType_ = getDefaultInstance().getMysqlType();
            onChanged();
            return this;
        }

        @Override
        public final Builder setUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.setUnknownFieldsProto3(unknownFields);
        }

        @Override
        public final Builder mergeUnknownFields(
                final com.google.protobuf.UnknownFieldSet unknownFields)
        {
            return super.mergeUnknownFields(unknownFields);
        }


        // @@protoc_insertion_point(builder_scope:com.alibaba.otter.canal.protocol.Column)
    }

}
